﻿@model KeyCore.Loans.Client.Web.Models.LoansClient.LoansClientRegisterWizardModel
@using Microsoft.Web.Mvc
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutMaster.cshtml";
}

<h2>Index</h2>

@{
    var currentStep = Model.Steps[Model.CurrentStepIndex];
}

<h3>Step @(Model.CurrentStepIndex + 1) out of @Model.Steps.Count</h3>

@using (Html.BeginForm())
{
    @Html.Serialize("wizard", Model)

    @Html.Hidden("StepType", Model.Steps[Model.CurrentStepIndex].GetType())
    @Html.EditorFor(m => currentStep, null, "")

  if (Model.CurrentStepIndex > 0)
    {
        <input type="submit" value="Cofnij" name="prev" />
    }

    if (Model.CurrentStepIndex < Model.Steps.Count - 1)
    {
        <input type="submit" value="Dalej" name="next" />
    }
    else
    {
        <input type="submit" value="Zakończ" name="finish" />
    }
}